
    <!-- EC2 grant -->
    <script id="ec2_grants.partial" type="text/x-handlebars-template">
      <ul>
        {{#each items}}
          <li class="list-group-item-text">
            <span id="ec2.regions.{{../region}}.vpcs.{{../vpc}}.security_groups.{{../sg_id}}.rules.{{../direction}}.protocols.{{../protocol}}.ports.{{../ports}}.security_groups.{{@key}}">
              {{#if GroupName}}
                {{GroupName}} (<a href="javascript:findAndShowEC2Object('regions.vpcs.security_groups', '{{GroupId}}')">{{GroupId}}</a>)
              {{else}}
                {{GroupId}} (AWS account ID {{UserId}})
              {{/if}}
            </span>
          </li>
        {{/each}}
      </ul>
    </script>
    <script>
        Handlebars.registerPartial("ec2_grants", $("#ec2_grants\\.partial").html());
    </script>

